import request from '@/utils/request'

export function findPage(page, data) {
  return request({
    url: '/monitor/monitor-time-task/page',
    method: 'post',
    params: page,
    data
  })
}

export function save(data) {
  return request({
    url: '/monitor/monitor-time-task/save',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/monitor/monitor-time-task/update',
    method: 'put',
    data
  })
}

export function find(id) {
  return request({
    url: '/monitor/monitor-time-task/find/' + id,
    method: 'get'
  })
}

export function remove(id) {
  return request({
    url: '/monitor/monitor-time-task/delete/' + id,
    method: 'delete'
  })
}

export function removeIds(data) {
  return request({
    url: '/monitor/monitor-time-task/deleteIds',
    method: 'delete',
    data
  })
}

export function changeState(data) {
  return request({
    url: '/monitor/monitor-time-task/changeState',
    method: 'post',
    data
  })
}

export function run(id) {
  return request({
    url: '/monitor/monitor-time-task/run/' + id,
    method: 'get'
  })
}
